-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add ability to set title options #4
base: master
Are you sure you want to change the base?
Conversation
@@ -1,11 +1,11 @@ | |||
const title = require('title') | |||
const visit = require('unist-util-visit') | |||
|
|||
module.exports = () => (tree, file) => { | |||
module.exports = (options) => () => (tree, file) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure it should be
module.exports = (options) => (tree, file) => {
no extra function needed
even though no one seems to notice this PR 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I patched node_modules
locally and it appears Max's original solution works as intended! 🎉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For anyone in the future stumbling onto this, you can use patch-package
to get this working.
I'd love to see this through 😍 I've been manually using Any chance we get some eyes here? 👀 @leo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Throwing an approval into the abyss ✅
Any updates on that? 🙃 I've tried messing around with the module itself like so,
but I can't figure out how to pass those options with the plugin when parsing markdown.... 😕 Also the |
@theophilelouvel I used the patch approach here since last May and just recently removed it. This plugin was nice, but ultimately I was tired of adding this to my exceptions list that I didn't want title capitalize. |
@leerob That's a drawback for sure... You can either spend time capitalizing or decapitalizing words 😅 It would be tempting to propose to bake a list of special cased words into title itself, but probably not too practical as the list would quickly get out of hands... ! |
I'm not sure if this is the right way to do it, but this adds another layer of function to add support for
title
options.Closes #3